<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        console.log(1+1);   //2
        console.log(4%2);   //0
        console.log(3/2);   //1.5    不是java中的取商
        console.log(5/2);
        console.log(3%5);    //3

        console.log(0.1+0.2);  //浮点数会有精度问题


        //求余数
        document.write(1%4);
        document.write(6%4);
        //求商
        console.info(1/4);
        console.info(6/4);
        //求商，取整
        console.info(parseInt(1/4));
        console.info(parseInt(6/4));
        console.info('----');
        //天花板取整
        console.info(Math.ceil(1/4));
        //地板取整
        console.info(Math.floor(1/4));

    </script>
</head>
<body>

</body>
</html>